package com.company;

public class L_TeacherPeople extends L_People {
    private int tYear;    //教龄
    private String tDept;    //所教专业
    public L_TeacherPeople(String name,int age,String sex,String sn,int tYear,String tDept)
    {
        super(name,age,sex,sn);    //调用父类中的构造方法
        this.tYear=tYear;
        this.tDept=tDept;
    }
    public String toString()
    {
        return"姓名："+name+"\n年龄："+age+"\n性别:"+sex+"\n身份证号："+sn+"\n教龄："+tYear+"\n所教专业："+tDept;
    }
}
